package jgamio.framework.application;

import java.util.ArrayList;
import java.util.List;

public class ComponentsList
{
	private List<Component> components = new ArrayList<Component>();
	
	public void add(Component component)
	{
		this.components.add(component);
	}
	
	public Component getComponentByIdentifier(int identifier)
	{
		for (int i = 0; i < components.size(); i++)
		{
			if (components.get(i).getIdentifier() == identifier)
			{
				return components.get(i);
			}
		}
		
		return null;
	}
}
